package demo;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

import org.apache.poi.hssf.usermodel.HSSFCellStyle;
import org.apache.poi.hssf.util.HSSFColor;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellStyle;
import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.xssf.usermodel.XSSFFont;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.json.JSONArray;
import org.json.JSONObject;

import util.CopyWriteTwo;

/**
 * 时代地产:中长期项目数据写入Excel
* Title: 
* Description: 
* @author landa
* @date 2017年4月24日 上午10:39:40
 */
public class WriteDataToExcel {
	
	static Map baseMapExcelColumn = new HashMap();
	static Map detailMapExcelColumn = new HashMap();
	
	public static void main(String[] args) throws Exception {
		initMap();
		getData();

	}
	
	
	
	
	static void getData() throws Exception{
		
		String baseData = "[{\"WSGQBL\":\" \",\"TDQSF\":\"广东伟业铝厂集团有限公司潘伟津 水头乡\",\"CSGS\":\"广州南\",\"ZJYF\":\"6666\",\"XMDZ\":\"大沥水头村、龙三村范围内\",\"WLBNNZF\":\"8888\",\"XH\":\"3\",\"JYDMJ\":\"5.5\",\"SFMZSDTJ\":\"是\",\"ZJRJM\":\"6.6\",\"XMMC\":\"伟业铝厂\",\"HZLX\":\"已承租项目\",\"XMZDMJ\":\"8.4\",\"NZJCB\":\"9999\",\"XMLX\":\"集体旧厂\",\"CODE\":\"44\",\"OBJECTID\":\"29\",\"ZJNZJCB\":\"5555\",\"XMDKQYQX\":\"截止时间：2046/4/1\",\"ZYDMJ\":\"4.5\",\"NJYSR\":\"120000\",\"YJSJ\":\"1111\",\"CSMC\":\"佛山市\",\"ZJZJE\":\"3333\",\"RJL\":\"容积率\",\"TDHQSJJG\":\"70000\",\"TDHQSJLMDJ\":\"50000\",\"SFYSD\":\"否\",\"ZJBZ\":\"ok,已经ok\",\"SYQYQX\":\"30\",\"SGWYMJ\":\"0.5684（国有地块）租赁地块未统计\",\"PKUUID\":\"29\",\"FQMC\":\"南海区\",\"SFYSG\":\"有\",\"WSJRJM\":\"44.5\",\"ZJWF\":\"7777\",\"YGHJ\":\"2222\"},{\"WSGQBL\":\" \",\"XMDKQYQX\":\"起租日期：2026年2月28日截止日期：2026年3月31日\",\"TDQSF\":\"佛山市南海区桂城街夏东三洲股份合作经济社\",\"CSGS\":\"广州南\",\"XMDZ\":\"1.大成围原花盆厂、原塑料制品厂、原纸品厂；2.大成围地块一、地块二及地块三\",\"XH\":\"1\",\"CSMC\":\"佛山市\",\"SFYSD\":\"是\",\"SYQYQX\":\"10\",\"XMMC\":\"夏东三洲村项目\",\"XMZDMJ\":\"2.8\",\"HZLX\":\"已承租项目\",\"PKUUID\":\"28\",\"SGWYMJ\":\"1.4\",\"FQMC\":\"南海区\",\"SFYSG\":\"有\",\"OBJECTID\":\"28\",\"CODE\":\"43\",\"XMLX\":\"集体旧厂\"},{\"WSGQBL\":\"\u2014\u2014\",\"XMDKQYQX\":\" \",\"TDQSF\":\"广州番禺威乐办公用品有限公司\",\"CSGS\":\"广州南\",\"XMDZ\":\"番禺区番禺区沙湾镇福龙路\",\"XH\":\"7\",\"CSMC\":\"广州市\",\"SFYSD\":\"否\",\"SYQYQX\":\" \",\"XMMC\":\"番禺沙湾珠宝产业园\",\"XMZDMJ\":\"85000\",\"HZLX\":\"其他项目\",\"PKUUID\":\"10\",\"SGWYMJ\":\"\u2014\u2014\",\"FQMC\":\"番禺区\",\"SFYSG\":\"是\",\"OBJECTID\":\"10\",\"CODE\":\"5\",\"XMLX\":\"旧厂改造\"},{\"WSGQBL\":\" \",\"XMDKQYQX\":\"5年\",\"TDQSF\":\"南横村村委\",\"CSGS\":\"广州南\",\"XMDZ\":\"南沙区南沙街道环市大道南与望岛路交界\",\"XH\":\"2\",\"CSMC\":\"广州市\",\"SFYSD\":\"否\",\"SYQYQX\":\"4\",\"XMMC\":\"广州市南横村留用地项目\",\"XMZDMJ\":\"67334\",\"HZLX\":\"已承租项目\",\"PKUUID\":\"57\",\"SGWYMJ\":\"/\",\"FQMC\":\"南沙区\",\"SFYSG\":\"无\",\"OBJECTID\":\"57\",\"CODE\":\"38\",\"XMLX\":\"留用地\"}]";
		
		String detailData= "[{\"TIMENODE_NAME\":\"提交改造申请\",\"TIMENODE_INDEX\":\"1\",\"TIMENODE_CYCLE\":\"1\",\"PROJECT_ID\":\"10\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2017-04-14 00:00:00.0\"},{\"TIMENODE_NAME\":\"纳入年度预备计划\",\"TIMENODE_INDEX\":\"2\",\"TIMENODE_CYCLE\":\"2\",\"PROJECT_ID\":\"10\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2017-04-16 00:00:00.0\"},{\"TIMENODE_NAME\":\"纳入年度正式计划\",\"TIMENODE_INDEX\":\"3\",\"TIMENODE_CYCLE\":\"3\",\"PROJECT_ID\":\"10\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2017-04-19 00:00:00.0\"},{\"TIMENODE_NAME\":\"编制片区策划方案并取得批复\",\"TIMENODE_INDEX\":\"4\",\"TIMENODE_CYCLE\":\"4\",\"PROJECT_ID\":\"10\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2017-04-23 00:00:00.0\"},{\"ACTUAL_FINISH_TIME\":\"2017-04-22 00:00:00.0\",\"ACTUAL_PAY_MONEY\":\"22222\",\"TIMENODE_NAME\":\"提交改造申请\",\"TIMENODE_INDEX\":\"1\",\"TIMENODE_CYCLE\":\"1\",\"PROJECT_ID\":\"28\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2017-04-14 00:00:00.0\",\"STATUS\":\"2\"},{\"TIMENODE_NAME\":\"纳入年度预备计划\",\"TIMENODE_INDEX\":\"2\",\"TIMENODE_CYCLE\":\"2\",\"PROJECT_ID\":\"28\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2017-04-16 00:00:00.0\"},{\"TIMENODE_NAME\":\"纳入年度正式计划\",\"TIMENODE_INDEX\":\"3\",\"TIMENODE_CYCLE\":\"3\",\"PROJECT_ID\":\"28\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2017-04-19 00:00:00.0\"},{\"TIMENODE_NAME\":\"编制片区策划方案并取得批复\",\"TIMENODE_INDEX\":\"4\",\"TIMENODE_CYCLE\":\"4\",\"PROJECT_ID\":\"28\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2017-04-23 00:00:00.0\"},{\"ACTUAL_PAY_MONEY\":\"0\",\"TIMENODE_NAME\":\"村表决通过合作方案\",\"TIMENODE_INDEX\":\"1\",\"TIMENODE_CYCLE\":\"90\",\"PROJECT_ID\":\"29\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2017-07-12 00:00:00.0\",\"STATUS\":\"1\"},{\"ACTUAL_PAY_MONEY\":\"0\",\"TIMENODE_NAME\":\"取得建设批准书\",\"TIMENODE_INDEX\":\"2\",\"TIMENODE_CYCLE\":\"80\",\"PROJECT_ID\":\"29\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2017-09-30 00:00:00.0\",\"STATUS\":\"1\"},{\"TIMENODE_NAME\":\"村集体表决通过收储方案\",\"TIMENODE_INDEX\":\"3\",\"TIMENODE_CYCLE\":\"70\",\"PROJECT_ID\":\"29\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2017-12-09 00:00:00.0\",\"STATUS\":\"1\"},{\"TIMENODE_NAME\":\"提交收储申请\",\"TIMENODE_INDEX\":\"4\",\"TIMENODE_CYCLE\":\"60\",\"PROJECT_ID\":\"29\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2018-02-07 00:00:00.0\",\"STATUS\":\"1\"},{\"TIMENODE_NAME\":\"出具规划设计要点\",\"TIMENODE_INDEX\":\"5\",\"TIMENODE_CYCLE\":\"50\",\"PROJECT_ID\":\"29\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2018-03-29 00:00:00.0\",\"STATUS\":\"1\"},{\"TIMENODE_NAME\":\"评估地价\",\"TIMENODE_INDEX\":\"6\",\"TIMENODE_CYCLE\":\"40\",\"PROJECT_ID\":\"29\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2018-05-08 00:00:00.0\",\"STATUS\":\"1\"},{\"TIMENODE_NAME\":\"审批通过出让方案\",\"TIMENODE_INDEX\":\"7\",\"TIMENODE_CYCLE\":\"30\",\"PROJECT_ID\":\"29\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2018-06-07 00:00:00.0\",\"STATUS\":\"1\"},{\"TIMENODE_NAME\":\"签订收储协议\",\"TIMENODE_INDEX\":\"8\",\"TIMENODE_CYCLE\":\"20\",\"PROJECT_ID\":\"29\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2018-06-27 00:00:00.0\",\"STATUS\":\"1\"},{\"TIMENODE_NAME\":\"土地挂牌\",\"TIMENODE_INDEX\":\"9\",\"TIMENODE_CYCLE\":\"10\",\"PROJECT_ID\":\"29\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2018-07-07 00:00:00.0\",\"STATUS\":\"1\"},{\"TIMENODE_NAME\":\"村表决通过合作方案\",\"TIMENODE_INDEX\":\"1\",\"TIMENODE_CYCLE\":\"90\",\"PROJECT_ID\":\"57\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2017-07-12 00:00:00.0\"},{\"TIMENODE_NAME\":\"取得建设批准书\",\"TIMENODE_INDEX\":\"2\",\"TIMENODE_CYCLE\":\"80\",\"PROJECT_ID\":\"57\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2017-09-30 00:00:00.0\"},{\"TIMENODE_NAME\":\"村集体表决通过收储方案\",\"TIMENODE_INDEX\":\"3\",\"TIMENODE_CYCLE\":\"70\",\"PROJECT_ID\":\"57\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2017-12-09 00:00:00.0\"},{\"TIMENODE_NAME\":\"提交收储申请\",\"TIMENODE_INDEX\":\"4\",\"TIMENODE_CYCLE\":\"60\",\"PROJECT_ID\":\"57\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2018-02-07 00:00:00.0\"},{\"TIMENODE_NAME\":\"出具规划设计要点\",\"TIMENODE_INDEX\":\"5\",\"TIMENODE_CYCLE\":\"50\",\"PROJECT_ID\":\"57\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2018-03-29 00:00:00.0\"},{\"TIMENODE_NAME\":\"评估地价\",\"TIMENODE_INDEX\":\"6\",\"TIMENODE_CYCLE\":\"40\",\"PROJECT_ID\":\"57\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2018-05-08 00:00:00.0\"},{\"TIMENODE_NAME\":\"审批通过出让方案\",\"TIMENODE_INDEX\":\"7\",\"TIMENODE_CYCLE\":\"30\",\"PROJECT_ID\":\"57\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2018-06-07 00:00:00.0\"},{\"TIMENODE_NAME\":\"签订收储协议\",\"TIMENODE_INDEX\":\"8\",\"TIMENODE_CYCLE\":\"20\",\"PROJECT_ID\":\"57\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2018-06-27 00:00:00.0\"},{\"TIMENODE_NAME\":\"土地挂牌\",\"TIMENODE_INDEX\":\"9\",\"TIMENODE_CYCLE\":\"10\",\"PROJECT_ID\":\"57\",\"PROJECT_START_TIME\":\"2017-04-13\",\"PLAN_FINISH_TIME\":\"2018-07-07 00:00:00.0\"}]";
		
		//基础数据
		JSONArray arr = new JSONArray(baseData);
		
		//补充数据
		JSONArray detailarr = new JSONArray(detailData);
	
		//对补充数据进行处理
		Map<String,List<JSONObject>> detailMap = initDetailData(detailarr);
		
		System.out.println(arr.toString());
		System.out.println(detailarr.toString());
	
		//1.分城市
		//2.map list集合
		//3.迭代map 迭代list
		
		Set<String> set = new HashSet<String>();
		Map<String,List<JSONObject>> baseMap = new HashMap<String,List<JSONObject>>();
		for(int i=0;i<arr.length();i++){
			JSONObject obj = (JSONObject)arr.get(i);
			
			Iterator iterator = obj.keys();
			String csmc = "";
			
			while (iterator.hasNext()) {
				if(obj.get("CSMC")!=null){
					csmc = (String)obj.getString("CSMC");
					set.add(csmc);
					break;
				}
			}
			
			if(baseMap.get(csmc)== null ){
				baseMap.put(csmc, new ArrayList<JSONObject>());
				baseMap.get(csmc).add(obj);
			}else{
				baseMap.get(csmc).add(obj);
			}
		}
		
		File dir = new File("");
		String path  = dir.getAbsolutePath();
//		POIExcelUtil.read_Excel(path+"\\src\\read\\template.xlsx", 1);
//		copyFromAtoB(path+"\\src\\read\\template.xlsx",path+"\\src\\read\\template4.xlsx" );
		//copyFromAtoA2(path+"\\src\\read\\template.xlsx"  );
		String source = path+"\\src\\read\\templateA.xlsx";
		String dest = path+"\\src\\read\\template5.xlsx" ;
		initExcelFile(source,dest,baseMap,detailMap);
		
		
//		System.out.println(baseMap.size());
//		System.out.println(baseMap.get("佛山市").size());
//		System.out.println(baseMap.get("广州市").size());
		
		
	}
	
	 static Map<String,List<JSONObject>> initDetailData(JSONArray detailData) {
			Set<String> set = new HashSet<String>();
			Map<String,List<JSONObject>> map = new HashMap<String,List<JSONObject>>();
			for(int i=0;i<detailData.length();i++){
				JSONObject obj = (JSONObject)detailData.get(i);
				
				Iterator iterator = obj.keys();
				String csmc = "";
				
				while (iterator.hasNext()) {
					if(obj.get("PROJECT_ID")!=null){
						csmc = (String)obj.getString("PROJECT_ID");
						set.add(csmc);
						break;
					}
				}
				
				if(map.get(csmc)== null ){
					map.put(csmc, new ArrayList<JSONObject>());
					map.get(csmc).add(obj);
				}else{
					map.get(csmc).add(obj);
				}
			}
			
			return map;
		
	 }




	/**
	 * 
	 * @param string 模板文件
	 * @param string2 复制的路径
	 * @param baseMap 写入的数据
	 * @throws Exception 
	 */
	static void initExcelFile(String source, String dest, Map<String, List<JSONObject>> baseMap , Map<String, List<JSONObject>> detailMap) throws Exception {
		CopyWriteTwo.copyAndWrite(source, dest);
		
		for(int i =0 ;i<baseMap.size();i++){
			CopyWriteTwo.copyFromAtoA2(dest);
		}
		
		writeData(dest,baseMap,detailMap);
		
	}




    static void writeData(String file, Map<String, List<JSONObject>> baseMap,  Map<String, List<JSONObject>> detailMap) throws IOException {
    	
	    	FileInputStream fis = new FileInputStream(file);
	    	
	    	// 去读取Excel
	    	XSSFWorkbook wb = new XSSFWorkbook(fis);
    				
			Set<String> citySet  = baseMap.keySet();
			Iterator iterator = citySet.iterator();
			int i = 0;
			while(iterator.hasNext()){
				
				Sheet sheet1 = wb.getSheetAt(i);
				CellStyle style = initExcelCellStyle(wb);
				
				// 写入
				Row rowFrom = null;
				Cell cellFrom = null;
				
				String key = (String)iterator.next(); //sheet名
				wb.setSheetName(i, key);
				i++;
				List<JSONObject> listJSONOBJ = baseMap.get(key);
			
				//基础信息的记录数
				for (int j = 0; j < listJSONOBJ.size(); j++) { //设置为记录数
					rowFrom = sheet1.createRow(j*2+5);
					JSONObject jsObj = listJSONOBJ.get(j);
					
					
					rowFrom.setHeight((short)900);
					
					for (int k = 0; k <35; k++) {
						cellFrom = rowFrom.createCell(k);//创建每一个表格
						cellFrom.setCellStyle(style);
						String columnName = (String) baseMapExcelColumn.get(k);
						if(jsObj.has(columnName)){
							cellFrom.setCellValue((String)jsObj.get(columnName));
						}
					}
					
					//一些字段的特殊处理
					//TODO 需处理 pkuuid 空的问题 ???
					if(detailMap.get(jsObj.get("PKUUID"))!=null){
						List<JSONObject>  detailList = detailMap.get(jsObj.get("PKUUID"));
						
						//项目类型字段
						String typeKey = (String) baseMapExcelColumn.get(0);
						if( detailList.get(0).has(typeKey)){
							Object temp  = detailList.get(0).get(typeKey);
							if(temp!=null){
								rowFrom.getCell(0).setCellValue((String)temp);
							}
						}

						
						//计划总金额
						
						String playMoneyKey = (String) baseMapExcelColumn.get(17);
						if( detailList.get(0).has(playMoneyKey)){
							Object temp  = detailList.get(0).get(playMoneyKey);
							if(temp!=null){
								rowFrom.getCell(17).setCellValue((String)temp);
							}
						}
 
						
						for (int k = 0; k < detailList.size(); k++) { //设置为记录数
							JSONObject tempObj = detailList.get(k);
							
							//开始时间 - 结束时间
							String date ="";
							Object startTimeObj = tempObj.has("PROJECT_START_TIME")? tempObj.get("PROJECT_START_TIME") : null;
							
							Object endTimeObj   =  tempObj.has("PLAN_FINISH_TIME")? tempObj.get("PLAN_FINISH_TIME") : null;  
							
							Object nodeNameObj  = tempObj.has("TIMENODE_NAME") ? tempObj.get("TIMENODE_NAME") : null;
							
							if(startTimeObj!=null){
								date+=(String)startTimeObj;
							}
							
							if(endTimeObj!=null){
								date+=(" ~ "+(String)endTimeObj);
							}
							 
							

							
							
							//节点
							if(nodeNameObj!=null ){
								
								for (int b = 35; b <35+detailList.size(); b++) {
									cellFrom = rowFrom.createCell(b);//创建每一个表格
									cellFrom.setCellStyle(style);
								}
								
								if(k==0){
									//建上一行
									Row tempRow = sheet1.createRow(j*2+4);
									for (int h = 0; h <35+detailList.size() ; h++) {
										Cell tempCell = tempRow.createCell(h);//创建每一个表格
										tempCell.setCellStyle(style);
									}
								}
								sheet1.getRow(j*2+4).getCell(35+k).setCellValue((String)nodeNameObj);;
								
							}
							
							if(!date.equals("")){
								rowFrom.getCell(35+k).setCellValue(date);;
							}
							
							
						}
						
						
					}
					
				}
				
			}
			
			FileOutputStream fileOut = new FileOutputStream(file);
			wb.write(fileOut); 
			
	        if(fis!=null){
	        	fis.close();
	        }
			
	        if(fileOut!=null){
	        	fileOut.close();
	        }
    	
	}
    
    static CellStyle initExcelCellStyle(XSSFWorkbook wb){
		CellStyle style = wb.createCellStyle();
//    	CellStyle style = new XSSFCellStyle();
		XSSFFont font = wb.createFont();
		font.setFontHeight(80);
		
	    style.setTopBorderColor(HSSFColor.BLACK.index);

        style.setBottomBorderColor(HSSFColor.BLACK.index);

        style.setLeftBorderColor(HSSFColor.BLUE.index);

        style.setRightBorderColor(HSSFColor.BLACK.index);
        

        style.setBorderTop(HSSFCellStyle.BORDER_THIN);
        style.setBorderBottom(HSSFCellStyle.BORDER_THIN);
        style.setBorderLeft(HSSFCellStyle.BORDER_THIN);
        style.setBorderRight(HSSFCellStyle.BORDER_THIN);
         
        font.setFontName("华文幼体");

        font.setFontHeightInPoints((short)15);
        

        font.setColor(HSSFColor.BLACK.index);

        font.setBoldweight(font.BOLDWEIGHT_BOLD);
        
        style.setFont(font);
        
        style.setFillBackgroundColor(HSSFColor.BLUE.index);
        
        return style;
    }




	static void initMap(){
		
		baseMapExcelColumn.put(0,"PROJECT_TYPE_NAME"); // 项目类型_
		baseMapExcelColumn.put(1,"ROWNUM"); // 序号
		baseMapExcelColumn.put(2,"CSGS"); // 区域 即所属城市公司
		baseMapExcelColumn.put(3,"XMMC"); // 项目名称
		baseMapExcelColumn.put(4,"YJZHSJ"); // 预计转化时间
		baseMapExcelColumn.put(5,"XMDZ"); // 项目地址
		baseMapExcelColumn.put(6,"TDQSF"); //土地权属方
		
		baseMapExcelColumn.put(7,"WSGQBL"); //我司股权比例
		baseMapExcelColumn.put(8,"ZYDMJ"); //总用地面积(万元)
		baseMapExcelColumn.put(9,"JYDMJ"); //我司净用地面积(万元)
		baseMapExcelColumn.put(10,"RJL"); //容积率  
		baseMapExcelColumn.put(11,"ZJRJM"); //总计容建面(万元)(含村的复建或其他)
		baseMapExcelColumn.put(12,"WSJRJM"); //我司计容建面(万元)
		baseMapExcelColumn.put(13,"TDHQSJLMDJ"); //土地获取实际楼面地价(万元)
		baseMapExcelColumn.put(14,"TDHQSJJG"); //土地获取实际价格(万元)
		baseMapExcelColumn.put(15,"YJSJ"); //预计售价(万元)
		baseMapExcelColumn.put(16,"YGHJ"); //预估货值(万元)
		
		baseMapExcelColumn.put(17,"PROJECT_PLAN_PAY_MONEY"); //(一次性支付/计划总金额)总金额 _
		baseMapExcelColumn.put(18,"YF"); //(一次性支付)已付 _ !!
		baseMapExcelColumn.put(19,"WF"); //(一次性支付)未付_
		
		baseMapExcelColumn.put(20,"ZJZJE"); //(租金)总金额
		baseMapExcelColumn.put(21,"ZJNZJCB"); //(租金)年租金成本
		baseMapExcelColumn.put(22,"ZJYF"); //(租金)已付
		baseMapExcelColumn.put(23,"ZJWF"); //(租金)未付
		baseMapExcelColumn.put(24,"ZJBZ"); //(租金)备注  
		baseMapExcelColumn.put(25,"WLBNNZF"); //未来半年拟支付(万元)
		baseMapExcelColumn.put(26,"SGWYMJ"); //上盖物业面积(万平米)
		baseMapExcelColumn.put(27,"SGWYMQXZQK"); //上盖物业目前现状情况描述
		baseMapExcelColumn.put(28,"SFMZSDTJ"); //是否满足收地条件
		baseMapExcelColumn.put(29,"SFYSD"); //是否已收地
		baseMapExcelColumn.put(30,"XCSFYGLRYJ"); //现场是否有管理人员及人数
		baseMapExcelColumn.put(31,"SYQYQX"); //剩余权益期限(年)
		baseMapExcelColumn.put(32,"XMDKQYQX"); //项目地块权益期限(承租/收购)
		baseMapExcelColumn.put(33,"NZJCB"); //年租金成本(万元)
		baseMapExcelColumn.put(34,"NJYSR"); //年经营收入(万元)
		baseMapExcelColumn.put(25,"PKUUID"); //主表pkuuid		

		
		
		//select 'baseMapExcelColumn.put("'||t.column_name||'",1); //'||t.comments from user_col_comments t where t.TABLE_NAME='CYXZ_DETAIL';
//		baseMapExcelColumn.put("SGWYMJ",1); //上盖物业面积(万平米)
//		baseMapExcelColumn.put("SGWYMQXZQK",1); //上盖物业目前现状情况描述
//		baseMapExcelColumn.put("SFYSD",1); //是否已收地
//		baseMapExcelColumn.put("XCSFYGLRYJ",1); //现场是否有管理人员及人数
//		baseMapExcelColumn.put("SYQYQX",1); //剩余权益期限(年)
//		baseMapExcelColumn.put("XMDKQYQX",1); //项目地块权益期限(承租/收购)
//		baseMapExcelColumn.put("ID",1); //
//		baseMapExcelColumn.put("ZYDMJ",1); //总用地面积(万元)
//		baseMapExcelColumn.put("JYDMJ",1); //我司净用地面积(万元)
//		baseMapExcelColumn.put("RJL",1); //容积率  
//		baseMapExcelColumn.put("ZJRJM",1); //总计容建面(万元)(含村的复建或其他)
//		baseMapExcelColumn.put("WSJRJM",1); //我司计容建面(万元)
//		baseMapExcelColumn.put("TDHQSJLMDJ",1); //土地获取实际楼面地价(万元)
//		baseMapExcelColumn.put("TDHQSJJG",1); //土地获取实际价格(万元)
//		baseMapExcelColumn.put("YJSJ",1); //预计售价(万元)
//		baseMapExcelColumn.put("YGHJ",1); //预估货值(万元)
//		baseMapExcelColumn.put("ZJZJE",1); //(租金)总金额
//		baseMapExcelColumn.put("ZJNZJCB",1); //(租金)年租金成本
//		baseMapExcelColumn.put("ZJYF",1); //(租金)已付
//		baseMapExcelColumn.put("ZJWF",1); //(租金)未付
//		baseMapExcelColumn.put("ZJBZ",1); //(租金)备注  
//		baseMapExcelColumn.put("WLBNNZF",1); //未来半年拟支付(万元)
//		baseMapExcelColumn.put("SFMZSDTJ",1); //是否满足收地条件
//		baseMapExcelColumn.put("NZJCB",1); //年租金成本(万元)
//		baseMapExcelColumn.put("NJYSR",1); //年经营收入(万元)
//		baseMapExcelColumn.put("PKUUID",1); //主表pkuuid
//		baseMapExcelColumn.put("TDQSF",1); //土地权属方
//		baseMapExcelColumn.put("WSGQBL",1); //我司股权比例
//		baseMapExcelColumn.put("XMZDMJ",1); //项目占地面积(平方)
//		baseMapExcelColumn.put("SFYSG",1); //是否有上盖
		
//		detailMapExcelColumn
	}

}
